﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DTO;
namespace DAO
{
    public class ThamSoDAO
    {
        public ThamSoDTO LayThamSo()
        {
            DataTable dt =  DataProvider.LoadTable("select * from ThamSo");
            DataRow r = dt.Rows[0];
            ThamSoDTO ts = new ThamSoDTO();
            ts.Heso = Double.Parse(r["Heso"].ToString());
            ts.Phuthu = Int32.Parse(r["Phuthu"].ToString());
            ts.Succhua = Int32.Parse(r["Succhua"].ToString());
            ts.Loaikh = Int32.Parse(r["MaLoaiKh"].ToString());
            return ts;
        }
    }
}
